-- GENERATED SPELL FOR [Plagued Dragonflayer Tribesman] --


function spell0_23564(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23564', 601, 1)
end

function spell1_23564(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(32736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23564', 5322, 1)
end

function spell2_23564(pUnit, Event) --@Plague Blight,n/a--
pUnit:FullCastSpellOnTarget(43506,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23564', 30338, 1)
end

function spell3_23564(pUnit, Event) --@Plagued Blood Explosion,Self--
pUnit:FullCastSpellOnTarget(42167,pUnit)
pUnit:RegisterEvent('Sorts_23564', 2268, 1)
end

function Sorts_23564(pUnit, Event)
local choix_sorts_23564 = math.random(0, 3)
if choix_sorts_23564 == 0 then
pUnit:RegisterEvent('spell0_23564', 1, 1)
end
if choix_sorts_23564 == 1 then
pUnit:RegisterEvent('spell1_23564', 1, 1)
end
if choix_sorts_23564 == 2 then
pUnit:RegisterEvent('spell2_23564', 1, 1)
end
if choix_sorts_23564 == 3 then
pUnit:RegisterEvent('spell3_23564', 1, 1)
end
end

function mob23564_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23564', math.random(1500, 3000), 1)
end

function mob23564_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23564_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23564_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23564, 1, 'mob23564_Action')
RegisterUnitEvent(23564, 2, 'mob23564_Leave')
RegisterUnitEvent(23564, 3, 'mob23564_Kill')
RegisterUnitEvent(23564, 4, 'mob23564_Die')
